package demo.controller;

import java.util.Map;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import demo.po.Student2;
import demo.po.Teacher;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;

//@Api(protocols="http,hessian")
public class SwaggerDemoNormal {
	@ApiOperation(
			value = "fun36方法的概括说明，<120字",
			notes="fun36,很长很长的详细的方法注释",
			tags="demo.controller.SwaggerDemoNormal",	//设置成类名  ===========auto
			/*可选值："GET"获取资源, "HEAD","DELETE"删除资源, "OPTIONS"获取配置
			 * "POST"新建资源, "PUT"更新资源, "PATCH"局部更新资源*/
			httpMethod="GET"	//设置成类名  ===========default get
		)
	/*@ApiImplicitParams(value=@ApiImplicitParam(
						dataType="int",	//数据类型：类名或基本类型
						paramType="form"	//参数类型： path, query, body, header or form
					))*/
	@ApiResponses(value={	//返回说明：
				@ApiResponse(
						code=200,	//返回的http状态码 ,自动生成
						message="返回说明"/*,
						response=Student2.class,	//手动指定返回值
						responseContainer="List"*/	//返回值的容器：必须是"List", "Set" or "Map". 自动识别
					),
				@ApiResponse(
						code=400,	//返回的http状态码
						message="返回说明",
						response=Student2.class
					)	
			})
	//=================auto ,path自动生成： /类名/方法名-1,2,3 
	@RequestMapping(value="/demo.controller.SwaggerDemoNormal/fun36",method=RequestMethod.POST)
	public Student2 fun36(@ApiParam(value="实体类Teacher参数注释说明",name="t")Teacher t,
						@ApiParam(name="count",
							value="参数的注释-count",
							defaultValue="参数默认值",
							allowableValues="1,2,3",	//参数的取值范围，格式：枚举用逗号，数值范围用range[2,5),[1,infinity]
							required=true	//该参数是否必填
							)int count,
						@ApiParam Student2 ss){return null;}
	
	public void fun00(){}
	
	public int fun10(){return 0;}
	
	public Map<String,String> fun20(){return null;}
	
	public Teacher fun30(){return null;}
	
	public Object fun40(){return null;}
	
	public void fun01(int num){}
	
	public void fun02(Map<String,String> map){}
	
	public void fun03(Teacher t){}
	
	public void fun04(Object obj){}
	
	public void fun05(Teacher t,int count){}
	
	public Teacher fun35(Teacher t,int count){return null;}
}

